<template name="palaceList">
	<view class="palaceList">
		<view class="cu-bar bg-white solid-bottom">
			<view class="action">
				<text class="cuIcon-title text-blue "></text> 全网视频列表
			</view>
		</view>
		<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
			<view class="cu-item" v-for="(item,index) in iconList" :key="index" v-if="index<gridCol*3" @click="toGov(item.company)">
				<view>
					<!-- <a :href="item.src"><image class="videoIcon" :src="item.image"></image></a> -->
					<image class="videoIcon" :src="item.image"></image>
				</view>
				<text style="color: #333333;">{{item.name}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				iconList: [{
						image: '/static/video/tengxun.png',
						name: '腾讯视频',
						company: 1

					}, {
						image: '/static/video/youku.png',
						name: '优酷视频',
						company: 2
					},
					{
						image: '/static/video/douban.png',
						name: '豆瓣视频',
						company: 3
					},
					{
						image: '/static/video/aiqiyi.png',
						name: '爱奇艺',
						company: 0
					},
					{
						image: '/static/video/leshi.png',
						name: '乐视视频',
						company: 4
					},
					{
						image: '/static/video/mangguo.png',
						name: '芒果TV',
						company: 5
					},
					{
						image: '/static/video/pptv.png',
						name: 'PPTV',
						company: 6
					},
					{
						image: '/static/video/souhu.png',
						name: '搜狐视频',
						company: 7
					},
					{
						image: '/static/video/tudou.png',
						name: '土豆视频',
						company: 8
					},
				],
				gridCol: 3,
				gridBorder: false,
			}
		},
		methods: {
			toGov(company) {
				let phone = uni.getStorageSync('phone')
				if (phone) {
					uni.navigateTo({
						url: '/subFirst/playType/playType?company=' + company
					})
				} else {
					uni.showToast({
						title: '您尚未登陆不可观看哦',
						icon: 'none'
					})
				}
			}
		}
	}
</script>

<style>
	.videoIcon {
		width: 30px;
		height: 30px;
	}
</style>
